﻿using RabbitMQ.Client;
using System.Collections.Generic;

namespace Infrastructure.Utility.Core.RabbitMq.Providers
{
    public interface IPublisher
    {
        /// <summary>
        /// 发布消息
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="connection"></param>
        /// <param name="message"></param>
        bool Publish<T>(string routeKey, T message) where T : class;

        bool Publish<T>(string routeKey, string fullName, T message,
                        IDictionary<string, string> headers) where T : class;
    }
}
